public class testThread2 {

    public static void main(String[] args) {
        ThreadPool pool =new ThreadPool();

        for (int i=0;i<8;i++){
            Runnable task =  new Runnable() {
                public void run() {
                    System.out.println("去抢劫银行");
                }
            };
            pool.add(task);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        }
    }
